package com.hsy.crm.web.web.finance;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.VerificateOrder;
import com.hsy.crm.web.domain.vo.verificate.VerifiOrderPageVo;
import com.hsy.crm.web.domain.vo.verificate.VerificateInsertVo;
import com.hsy.crm.web.domain.vo.verificate.VerificateOrderPageVo;
import com.hsy.crm.web.service.impl.VerificateOrderService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/verificate")
public class VerificateOrderAction extends BaseAction {

    @Autowired
    VerificateOrderService verificateOrderService;

    @RequestMapping("/insert")
    public String insert(VerificateInsertVo vo) {
        return Response.body(verificateOrderService.insertVerificate(vo));
    }

    @RequestMapping("/update")
    public String update(VerificateInsertVo vo) {
        return Response.body(verificateOrderService.updateVerificate(vo));
    }

    @RequestMapping("/delete")
    public String delete(VerificateOrder order) {
        return Response.body(verificateOrderService.deleteVerificate(order));
    }

    @RequestMapping("/getOrder")
    public String getOrder(VerificateOrder order) {
        return Response.body(verificateOrderService.getOrder(order));
    }

    @RequestMapping("/getVerifi")
    public String getVerifi(VerificateOrder order) {
        return Response.body(verificateOrderService.getOrder(order));
    }

    @RequestMapping("/page")
    public String page(VerificateOrderPageVo verificateOrderPageVo) {
        return Response.body(verificateOrderService.page(verificateOrderPageVo));
    }

    @RequestMapping("/verifiPage")
    public String verifiPage(VerifiOrderPageVo verifiOrderPageVo) {
        return Response.body(verificateOrderService.verifiPage(verifiOrderPageVo));
    }

    @RequestMapping("/examine")
    public String examine(VerificateOrder order) {
        return Response.body(verificateOrderService.examine(order));
    }

    @RequestMapping("/invalid")
    public String doInvalid(VerificateOrder order) {
        return Response.body(verificateOrderService.doInvalid(order));
    }

}
